#include "io/sk_file.h"
//high bytes on the front
void SK_IOUTIL_int2Bytes(SK_INT32 value,SK_BYTE *bytes,SK_INT32 offset,SK_INT32 len)
{
  SK_INT32 i;
  for (i = 0 ;i < len ;i++)
  {
	bytes[offset + len - i - 1] = (SK_BYTE)((value >> (i * 8)) & 0xff);
  }
}
SK_INT32 SK_IOUTIL_bytes2Int(SK_BYTE *bytes,SK_INT32 offset,SK_INT32 len)
{
	SK_INT32 value = 0;
	SK_INT32 i = 0;
	for (i = 0 ;i < len ;i++)
	{
		value =  (value << 8) |  bytes[offset + i];
	}
	return value;
}